package com.lagou.edu.service.impl;

import com.lagou.edu.dao.ResumeDao;
import com.lagou.edu.pojo.Resume;
import com.lagou.edu.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 陶肖寅
 * @version V1.0
 * @Package com.lagou.edu.service.impl
 * @date 2020-02-02 09:26
 * @Copyright © 2020-2021 城云科技(中国)有限公司
 */
@Service
public class ResumeServiceImpl implements ResumeService {
    @Autowired
    private ResumeDao resumeDao;

    @Override
    public Resume getResumeById(Long id) {
        return resumeDao.findById(id).get();
    }

    @Override
    public List<Resume> queryResumeList() throws Exception {
        return resumeDao.findAll();
    }

    @Override
    public Resume saveResume(Resume resume) {
        return resumeDao.save(resume);
    }

    @Override
    public void deleteResume(Long id) {
         resumeDao.deleteById(id);
    }
}
